﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> 
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.ManageContentTypePage" MasterPageFile="~/_layouts/application.master"   EnableViewState="false" EnableViewStateMac="false"   %> 
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="wssap" Namespace="Microsoft.SharePoint.ApplicationPages" Assembly="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_pagehtmltitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script>
var strConfirm =
<%
if (CurrentList != null)
{
%>
	"<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,managecontenttype_settings_delete_confirm%>' EncodeMethod='HtmlEncode'/>";
<%
}
else
{
%>
	"<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,managecontenttype_settings_delete_confirm_for_template%>' EncodeMethod='HtmlEncode'/>";
<%
}
%>
</script>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
<% ContentTypePageUtil.RenderPageTitle(
	(Microsoft.SharePoint.WebControls.LayoutsPageBase)this,
	CurrentList,
	ContentType,
	"managecontenttype_pagetitle_for_template",
	"managecontenttype_pagetitle");
%>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
	<IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt="">
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
	<INPUT TYPE="hidden" id="hidCtVersion" runat="server"/>
 <table cellspacing="0" cellpadding="0" border="0" style="width:100%;height: 100%" class="ms-settingsframe">
  <TR>
   <TD width=100% style="padding-top: 0px;">
	<table class="ms-pageinformation" width=100% cellpadding=0 cellspacing=0>
	 <tr>
	  <td valign=top style="padding: 10px;" width=100% height=100px>
	   <table cellpadding=0 cellspacing=2 id="idItemHoverTable">
		<TR>
			<TH colspan=2 style="padding-bottom: 4px;"  valign=top><span class="ms-linksectionheader">
<% if (CurrentList != null) { %>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_ct_information%>" EncodeMethod='HtmlEncode'/>
<% } else { %>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_ctt_information%>" EncodeMethod='HtmlEncode'/>
<% } %>
			</span></TH>
		</TR>
		<TR id="idName">
			<TH nowrap valign=top><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_settings_name%>" EncodeMethod='HtmlEncode'/></TH>
			<TD valign=top><%SPHttpUtility.HtmlEncode(ContentType.Name,Response.Output); %></TD>
		</TR>
		<TR id="idDescription">
			<TH nowrap valign=top><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_settings_description%>" EncodeMethod='HtmlEncode'/></TH>
			<TD valign=top><% SPHttpUtility.HtmlEncodeAllowSimpleTextFormatting(ContentType.Description,Response.Output); %></TD>
		</TR>
		<TR id="idParent">
			<TH nowrap valign=top><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_settings_parent_template%>" EncodeMethod='HtmlEncode'/></TH>
<%
   SPContentType parent = ContentType.Parent;
    
   if (parent != null)
   {
       if (parent.Name.ToUpper().IndexOf("PDF") >= 0)
       {  %>
         <TD valign=top id="idParent<%= parent.Id.ToString() %>"><a href='<%= parent.Scope == "/" ? string.Empty : SPHttpUtility.HtmlEncode(SPHttpUtility.UrlPathEncode(parent.Scope, false)) %>/_layouts/PdfForm/PdfForm.aspx?ctype=<%= parent.Id.ToString() %>'><% SPHttpUtility.HtmlEncodeAllowSimpleTextFormatting(parent.Name, Response.Output); %></a></TD>
   <% }
       else
       { %>
         <TD valign=top id="idParent<%= parent.Id.ToString() %>"><% SPHttpUtility.HtmlEncodeAllowSimpleTextFormatting(parent.Name, Response.Output); %> (Not a PDF Form, use the Site Content Type Page to edit.)</TD>
<% }
   }
   else
   { %>
      <TD valign=top id="idParentNull"></TD>
<% } %>
		</TR>
<% if (CurrentList == null) { %>
		<TR id="idGroup">
			<TH nowrap valign=top><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_settings_group%>" EncodeMethod='HtmlEncode'/></TH>
			<TD valign=top><% SPHttpUtility.HtmlEncode(ContentType.Group,Response.Output); %></TD>
		</TR>
<% } %>
	   </table>
	  </td>
	 </tr>
	</table>
   </TD>
  </TR>

	<!--Settings Header-->
	<% 
	 ///////////////////////// Not being used /////////////////////////////
	 //////////////////////////////////////////////////////////////////////
	 //////////////////////////////////////////////////////////////////////
	 //////////////////////////////////////////////////////////////////////
    %>
  <tr><td width=100%><table width=100% cellpadding=0 cellspacing=3>
  <tr>
   <td width=100%>
	<table cellpadding=0 cellspacing=0 border=0>
	 <tr>
	  <td valign=top>
		<SharePoint:FeatureLinks ID="GeneralLinks" runat="server"
			Location="Microsoft.SharePoint.ContentTypeSettings" GroupId="General"  Visible="false"
			OnAddLink="OnAddGeneralLink" />
	  </td>
	 </tr>
	</table>
   </td>
  </tr>
  </table></td></tr>
  <tr><td><IMG SRC="/_layouts/images/blank.gif" width=1 height=20 alt=""></td></tr>
	<% 
	 ///////////////////////// Not being used /////////////////////////////
	 //////////////////////////////////////////////////////////////////////
	 //////////////////////////////////////////////////////////////////////
	 //////////////////////////////////////////////////////////////////////
    %>




	<!--Fields Header-->
  <tr><td width=100%><table width=100% cellpadding=0 cellspacing=3>
  <TR height=10><TD class=ms-linksectionheader style="padding: 4px;"><SharePoint:EncodedLiteral runat="server" text="PDF Form's Promoted Properties" EncodeMethod='HtmlEncode'/></TD></TR>
		<TR>
			<TD colspan=4>
				<TABLE width="100%" cellpadding=0 cellspacing=0 border=0 id="columnstable">
					<TR>
						<TH class=ms-vh2 style="padding-bottom: 4px"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,managecontenttype_fields_name_header%>" EncodeMethod='HtmlEncode'/></TH>
					</TR>
					<%  ////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////		    		    		    		    
			            		    
					    try
                         {
                             foreach (SPField spField in ContentType.Fields)
                             {
                                 int rowNumber = 0;
                                 if (spField.Title.IndexOf("pdf_") >= 0)
                                 {
                                     String className = "";
                                    rowNumber++;
                                    if (rowNumber % 2 != 0) { className = "ms-alternating"; }
                                    Response.Write("<TR class='" + className + "' id='" + ContentType.Id + "'>");
                                    Response.Write("<TD class=ms-vb2 id='idpdf_TestField1'>");
                                    SPHttpUtility.HtmlEncode(spField.Title, Response.Output);
                                    Response.Write("</TD>");
                                    Response.Write("</TR>");
                                 }
                             }
                             
                         }
                         catch (Exception ex)
                         {
                             Response.Write("<TR><TD>Oops:" + ex.ToString() + "</TD></TR>");
                         }
                        
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////
                        /////////////////////////////////////////////////////////////////////////////////////////////////////////		    		    		    		    		    
				    %>
				</TABLE>
			</TD>
		</TR>
  </table></td></tr>

  <tr><td width=100%><table width=100% cellpadding=0 cellspacing=3>
  <tr>
   <td width=100%>
	<table cellpadding=1 cellspacing=2 border=0>
	 <tr>
	  <td valign=top>
		<SharePoint:FeatureLinks ID="FieldsLinks" runat="server" Visible="false"
			Location="Microsoft.SharePoint.ContentTypeSettings"
			GroupId="Fields"
			OnAddLink="OnAddFieldsLink" />
	  </td>
	 </tr>
	</table>
   </td>
  </tr>
  </table></td></tr>
  
  <tr><td width=100%><table width=100% cellpadding=0 cellspacing=3>
  <tr>
   <td width=100%>
	<table cellpadding=1 cellspacing=2 border=0>
	 <tr>
	  <td valign=top>
		<table cellspacing="0" cellpadding="0" width="100%" border="0">
		<tr>
			<td valign="top" nowrap class="ms-descriptiontext" width=8px style="padding-top:5px;">
				<IMG src="/_layouts/images/setrect.gif" width=5px height=5px alt=''>&nbsp;
			</td>
			<td valign="top" class="ms-descriptiontext" style="padding-top:7px;padding-left: 3px;">
            	<a id="ctl00_PromoteProperties" href="/_layouts/PdfForm/PdfFormFields.aspx?ctype=<% Response.Write (ContentType.Id); %>">Manage Promoted Properties</a>
		   </td>
		</tr>
		</table>
	  </td>
	 </tr>
	</table>
   </td>
  </tr>
  </table></td></tr>
  
 </TABLE>
</asp:Content>
